<html>
<head><meta charset="utf-8"><title>Deriving Display · project-error-handling · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/index.html">project-error-handling</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Deriving.20Display.html">Deriving Display</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="210669711"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Deriving%20Display/near/210669711" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Deriving.20Display.html#210669711">(Sep 20 2020 at 14:39)</a>:</h4>
<p><span class="user-mention" data-user-id="116155">@Jake Goulding</span> Not being able to derive <code>Display</code> isn't a thing for <em>absolutely no good reason at all</em></p>



<a name="210669761"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Deriving%20Display/near/210669761" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Deriving.20Display.html#210669761">(Sep 20 2020 at 14:40)</a>:</h4>
<p>That seems like a strong opinion you have that isn’t immediately relevant to this topic of enums. Perhaps it would be better elsewhere?</p>



<a name="210669776"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Deriving%20Display/near/210669776" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Deriving.20Display.html#210669776">(Sep 20 2020 at 14:41)</a>:</h4>
<p>Well if we could drive Display we could also derive Error, was the context there is all. We don't need to elaborate on it too much though.</p>



<a name="210669838"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Deriving%20Display/near/210669838" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Deriving.20Display.html#210669838">(Sep 20 2020 at 14:43)</a>:</h4>
<p>Topics are cheap, creating one is easy.</p>
<p>no worries, I did it for you.</p>



<a name="210669840"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Deriving%20Display/near/210669840" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> DPC <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Deriving.20Display.html#210669840">(Sep 20 2020 at 14:43)</a>:</h4>
<p>i was writing a rfc for derivin display in 2019, things happened in life so didn't get about finishing it. Gonna give it a try soon</p>



<a name="210669897"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Deriving%20Display/near/210669897" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Deriving.20Display.html#210669897">(Sep 20 2020 at 14:45)</a>:</h4>
<p>Actually I think the better long term plan, for errors, is something like jane's Reporter system, in which case the Error trait that goes with that can just drop the Display bound entirely.</p>



<a name="210669968"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Deriving%20Display/near/210669968" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jakub Duchniewicz <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Deriving.20Display.html#210669968">(Sep 20 2020 at 14:47)</a>:</h4>
<p>I am curious why Display is non-derivable, it is stated that it is so <code>by design</code> because it is user-facing. Is there a specific rule in the language regarding which traits should be derivable and which not?</p>



<a name="210670398"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Deriving%20Display/near/210670398" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Deriving.20Display.html#210670398">(Sep 20 2020 at 14:58)</a>:</h4>
<p><span class="user-mention" data-user-id="344196">@Jakub Duchniewicz</span> Could you share what the result of deriving <code>Display</code> would be for some representative types?</p>



<a name="210670665"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Deriving%20Display/near/210670665" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Deriving.20Display.html#210670665">(Sep 20 2020 at 15:04)</a>:</h4>
<p>I would like to derive Display the way thiserror does it, where it's basically the same as a handwritten impl but without boilerplate</p>



<a name="210670685"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Deriving%20Display/near/210670685" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Deriving.20Display.html#210670685">(Sep 20 2020 at 15:05)</a>:</h4>
<p>so you'd have</p>
<div class="codehilite"><pre><span></span><code><span class="cp">#[derive(Display)]</span><span class="w"></span>
<span class="k">enum</span> <span class="nc">Err</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">   </span><span class="cp">#[display = </span><span class="s">&quot;file not found&quot;</span><span class="cp">]</span><span class="w"></span>
<span class="w">   </span><span class="n">NotFound</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</code></pre></div>


<p>or something like that</p>



<a name="210670730"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Deriving%20Display/near/210670730" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Deriving.20Display.html#210670730">(Sep 20 2020 at 15:06)</a>:</h4>
<p>if it's in std, it might not want to do all the tricky bits with fields (<code>display = "{.0}"</code>), I'd be fine with requiring an explicit <code>impl Display</code> for that</p>



<a name="210670824"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Deriving%20Display/near/210670824" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> DPC <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Deriving.20Display.html#210670824">(Sep 20 2020 at 15:09)</a>:</h4>
<p>there was some concerns for Display, as to what it "form" it would choose since it is user facing</p>



<a name="210671095"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Deriving%20Display/near/210671095" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Deriving.20Display.html#210671095">(Sep 20 2020 at 15:15)</a>:</h4>
<p>Do <em>any</em> compiler-provided derives use associated attributes?</p>
<blockquote>
<p>the way thiserror does it,</p>
</blockquote>
<p>FWIW, SNAFU does something similar:</p>
<div class="codehilite"><pre><span></span><code><span class="cp">#[derive(Display)]</span><span class="w"></span>
<span class="k">enum</span> <span class="nc">Err</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">   </span><span class="cp">#[snafu(display(</span><span class="s">&quot;file not found {}&quot;</span><span class="cp">, foo))]</span><span class="w"></span>
<span class="w">   </span><span class="n">NotFound</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">foo</span>: <span class="kt">i32</span> <span class="p">}</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</code></pre></div>


<p>We forbid enums without named fields, partially because of the <code>.0</code> issue.</p>



<a name="210671342"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Deriving%20Display/near/210671342" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Deriving.20Display.html#210671342">(Sep 20 2020 at 15:22)</a>:</h4>
<p>wait, <span class="user-mention" data-user-id="224471">@Lokathor</span> how would using a reporter let us drop the Display bound from the error trait?</p>



<a name="210671356"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Deriving%20Display/near/210671356" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Deriving.20Display.html#210671356">(Sep 20 2020 at 15:23)</a>:</h4>
<p>something like eyre still needs display</p>



<a name="210671407"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Deriving%20Display/near/210671407" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Deriving.20Display.html#210671407">(Sep 20 2020 at 15:24)</a>:</h4>
<p>I do have some ideas about a 3rd fmt trait called Report that could be used to fix some of the reporting inconsistencies at expect/unwrap/Termination</p>



<a name="210671408"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Deriving%20Display/near/210671408" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Deriving.20Display.html#210671408">(Sep 20 2020 at 15:24)</a>:</h4>
<p>but that's also only half baked right now</p>



<a name="210671416"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Deriving%20Display/near/210671416" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Deriving.20Display.html#210671416">(Sep 20 2020 at 15:24)</a>:</h4>
<p>and that plan relies on specialization so it's not gonna happen any time soon</p>



<a name="210671486"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Deriving%20Display/near/210671486" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Deriving.20Display.html#210671486">(Sep 20 2020 at 15:26)</a>:</h4>
<p>i guess some code somewhere needs to know how to print a problem, and in that sense maybe it needs Display still, but i was initially thinking/hoping that the reporter would be smart enough via (<em>insert magic here</em>) to turn a plain Debug impl of an error into a report.</p>



<a name="210671530"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Deriving%20Display/near/210671530" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Deriving.20Display.html#210671530">(Sep 20 2020 at 15:28)</a>:</h4>
<p>personally I wouldn't <em>want</em> debug and display to be the same or similar most of the time</p>



<a name="210671565"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Deriving%20Display/near/210671565" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Deriving.20Display.html#210671565">(Sep 20 2020 at 15:29)</a>:</h4>
<p>except in trivial cases like <code>fn fmt(&amp;self) { self.0.fmt() }</code></p>



<a name="210671711"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Deriving%20Display/near/210671711" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> DPC <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Deriving.20Display.html#210671711">(Sep 20 2020 at 15:33)</a>:</h4>
<p>agreed</p>



<a name="210672056"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Deriving%20Display/near/210672056" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Deriving.20Display.html#210672056">(Sep 20 2020 at 15:43)</a>:</h4>
<p>That is exactly what I do almost always want out of the impl</p>



<a name="210675851"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Deriving%20Display/near/210675851" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jakub Duchniewicz <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Deriving.20Display.html#210675851">(Sep 20 2020 at 17:20)</a>:</h4>
<blockquote>
<p><span class="user-mention silent" data-user-id="344196">Jakub Duchniewicz</span> Could you share what the result of deriving <code>Display</code> would be for some representative types?</p>
</blockquote>
<p>My bad, I read up the docs once again and I understand why it is non-derivable now :) <br>
A stray thought(probably already thought over) - can't we check if a given type violates the UTF-8 requirement during compilation, thus informing user that the given type cannot derive <code>Display</code>?</p>



<a name="210676077"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Deriving%20Display/near/210676077" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Deriving.20Display.html#210676077">(Sep 20 2020 at 17:25)</a>:</h4>
<p><span class="user-mention silent" data-user-id="344196">Jakub Duchniewicz</span> <a href="#narrow/stream/257204-project-error-handling/topic/Deriving.20Display/near/210675851">said</a>:</p>
<blockquote>
<p>can't we check if a given type violates the UTF-8 requirement during compilation, thus informing user that the given type cannot derive <code>Display</code>?</p>
</blockquote>
<p>I'm not following exactly what you mean by this. UTF-8  is semi-related, but ultimately feels fairly orthogonal to the point.</p>



<a name="210676428"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Deriving%20Display/near/210676428" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jakub Duchniewicz <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Deriving.20Display.html#210676428">(Sep 20 2020 at 17:33)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116155">Jake Goulding</span> <a href="#narrow/stream/257204-project-error-handling/topic/Deriving.20Display/near/210676077">said</a>:</p>
<blockquote>
<p>I'm not following exactly what you mean by this. UTF-8  is semi-related, but ultimately feels fairly orthogonal to the point.</p>
</blockquote>
<p>Maybe I am utterly confused about why we cannot derive <code>Display</code>, but the <a href="https://doc.rust-lang.org/std/fmt/index.html#fmtdisplay-vs-fmtdebug">docs</a> state it is related to UTF-8 representation of the deriving struct's fields.</p>



<a name="210676729"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Deriving%20Display/near/210676729" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Deriving.20Display.html#210676729">(Sep 20 2020 at 17:40)</a>:</h4>
<p>Hmm, those docs are a bit unfortunate. I prefer those <a href="https://doc.rust-lang.org/std/fmt/trait.Display.html">on <code>Display</code> itself</a>:</p>
<blockquote>
<p>Display is similar to Debug, but Display is for user-facing output, and so cannot be derived.</p>
</blockquote>



<a name="210677261"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Deriving%20Display/near/210677261" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Deriving.20Display.html#210677261">(Sep 20 2020 at 17:53)</a>:</h4>
<p>If the derive would produce inappropriate output for a type, just don't derive in that case.</p>



<a name="210720389"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Deriving%20Display/near/210720389" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Deriving.20Display.html#210720389">(Sep 21 2020 at 09:48)</a>:</h4>
<p>Mmm, what exactly is it in std::error::Error that requires display formatting...? Is there a reason Debug wouldn't be good enough...? Because the repr is unstable, I guess?</p>



<a name="210727577"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Deriving%20Display/near/210727577" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Deriving.20Display.html#210727577">(Sep 21 2020 at 11:18)</a>:</h4>
<p>No code in <code>Error</code> requires <code>Display</code>. It’s a semantic requirement — errors are generally shown to a human being. <code>Debug</code> is meant to be shown to programmers, not human beings.</p>



<a name="210734640"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Deriving%20Display/near/210734640" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Deriving.20Display.html#210734640">(Sep 21 2020 at 12:39)</a>:</h4>
<p><a href="/user_uploads/4715/zuFA5zwdR6QOahbjSRA07CqG/rust_humanity.png">rust_humanity.png</a></p>
<div class="message_inline_image"><a href="/user_uploads/4715/zuFA5zwdR6QOahbjSRA07CqG/rust_humanity.png" title="rust_humanity.png"><img src="/user_uploads/4715/zuFA5zwdR6QOahbjSRA07CqG/rust_humanity.png"></a></div>



<a name="210737134"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Deriving%20Display/near/210737134" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Deriving.20Display.html#210737134">(Sep 21 2020 at 13:01)</a>:</h4>
<p>omg</p>



<a name="210737136"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Deriving%20Display/near/210737136" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Deriving.20Display.html#210737136">(Sep 21 2020 at 13:01)</a>:</h4>
<p>lol</p>



<a name="210737298"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Deriving%20Display/near/210737298" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Deriving.20Display.html#210737298">(Sep 21 2020 at 13:02)</a>:</h4>
<p>yea, I'd say that Display is the interface to an individual error's "error message". Debug almost always ends up being the interface to a description of it's content.</p>



<a name="210737394"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Deriving%20Display/near/210737394" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Deriving.20Display.html#210737394">(Sep 21 2020 at 13:03)</a>:</h4>
<p>if we switched to debug we'd still have to do all the same manual definition except now we'd be competing with the pre existing debug derive</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>